import { defineStore } from "pinia";
import { ref } from "vue";
import { SLIDERWIDTH } from "@/utils/constData";
export const useAppStore = defineStore("app", () => {
  const collapsed = ref({
    value: false,
    getv: () => collapsed.value.value,
    setv: (val: boolean) => collapsed.value.value = val
  });

  const acollapsed = ref({
    value: false,
    getv: () => acollapsed.value.value,
    setv: (val: boolean) => acollapsed.value.value = val
  });


  const sliderWidth = ref({
    value: SLIDERWIDTH,
    getv: () => sliderWidth.value.value,
    setv: (val: number) => sliderWidth.value.value = val
  })

  return { collapsed, acollapsed, sliderWidth };
});
